<template>
  <div class="useryx-iframe">
    <NavBar :title="type === 'xy' ? '用户协议' : '隐私政策'" />
    <iframe :src="url" class="content-top" height="100%" width="100%" style="border: none"></iframe>
  </div>
</template>

<script>
import NavBar from "@/components/NavBar.vue";
import Global from "@/Global";
export default {
  name: "UserXY",
  components: {
    NavBar,
  },
  props: ["type"],
  // 定义属性
  data() {
    return {
      url: "",
    };
  },
  mounted() {
    if (this.type === "xy") {
      this.url = `https://api.93job.com/yhxy.html?v=${Date.parse(new Date())}`;
    } else {
      this.url = `https://api.93job.com/yszc.html?v=${Date.parse(new Date())}"`;
    }
  },
};
</script>

<style lang="less">
@import "vant/lib/nav-bar/index.less";
@import "@/assets/css/common.less";

.useryx-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - @nav-bar-height);
  background-color: #fff;
}
</style>
